import { getSessionFromRequest } from "@/server/service/session-service";
import { wrapRoute } from "@/server/wrapper";
import { User } from "@prisma/client";

export async function GET(req: Request) {
  return await wrapRoute(async (): Promise<User> => {
    const session = await getSessionFromRequest(req)
    return await session.getMe()
  });
}
